Xbasic

A5.GET_MASTER_NAME Function

Syntax

Server_Path as C = .Get_Master_Name()

Description

The A5.GET_MASTER_NAME() method returns the name of the master database if the workstation is shadowed. Returns the Master database, or null if current database is not Network Optimized.

Example

The following script checks to see whether the user is using a master or shadowed database.

dim Master_name as C
Master_name = a5.Get_Master_Name()
if (Master_name = "") then 
 ui_msg_box("STOP", "You are NOT in a Shadow database." +crlf(2) + "You can only run this operation from a Shadow.", UI_STOP_SYMBOL+UI_OK) 
 END 
 End if

See Also